<?php 
defined('RUN_KATANA') or die('Restricted access');
$katana->recordTrackViews();
sessionChekOut();

if(is_object($db))
{ $db->close(); }

if(count($katana->getActiveCores()) > 0)
{	
	foreach($katana->ActiveCores as $core) //Activate Core Controller Classes
	{
		switch($core->getId())
		{
			case 1 : //Sitemap
				unset($sitemap);
			break;
			case 2 : //Access Controller
				unset($ac);
			break;
			case 3 : //Form Manager
				unset($fc);
			break;
			case 6 : //Advertise Controller
				unset($adc);
			break;
			case 8 : //Shop
				unset($shop);
				unset($cart);
			break;
			case 9 : //Survey
				unset($surveyCore);
			break;
			case 10 : //Fleet
				unset($fleet);
			break;
		}
	}
}
unset($katana);
//gc_enable();
//gc_collect_cycles();
//gc_disable();
ob_flush();
?>